Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better pipeline failure when curl fails on Windows #5985

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Mar 7, 2024

Related to #5979. The pipeline failed with a pretty unhelpful error message that required some guesswork.

I don't know much about PowerShell so there was some guesswork involved. I iterated a few times over on GitLab; since that history is lost here on GitHub, I'll write out some learnings for future reference here:

  • curl --fail is needed for the Test-Path approach to work, otherwise a corrupted file is created and Test-Path gives a related error (cannot run on corrupted file).
  • This page implied that we could use && and || similar to Linux, but I think that might be available only on certain PowerShell versions. I didn't easily see what version of PowerShell GLCI runs. So instead I switched to the CMD1; if (...) CMD2 else FAIL approach.

Here is the job that shows we're getting the intended error:

https://gitlab.com/Rdatatable/data.table/-/jobs/6337145911

Commit e137bb0 is purely stylistic, I didn't test it on GLCI. Not 100% sure it's still correct, so we can remove that commit if needed.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.49%. Comparing base (d09d741) to head (e137bb0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5985   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files          80       80           
  Lines       14861    14861           
=======================================
  Hits        14488    14488           
  Misses        373      373           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jangorecki jangorecki merged commit 815e054 into master Mar 7, 2024
5 checks passed
@jangorecki jangorecki deleted the windows-curl-failure branch March 7, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants